Skip to main content

Import Glass job descriptions file

This will import Non catalogue Glass job descriptions globally into ViSN. These descriptions will be displayed for all suppliers in ViSN.

Fields

Field NameDescriptionDatatypeValidationMax lengthMandatoryExample
ViSNUnique Id issued by ViSNstringA-Z a-z & 0-920YesG015
Repair DescriptionBrief description of the job itemstringA-Z a-z & 0-9,Special chars100YesRear vent (right)
Repair TypeGLASSstringonly ‘GLASS’ is allowedNAYesGLASS

Importing a file

Preparation

  1. Create a new branch with Jira task number in the branch name

  2. Delete all the files in importFiles folder

  3. Create a folder with the current sprint number

  4. Copy the file that needs to be imported

  5. Go to package.json , find the line validate:glassRepairDescriptions

  6. Modify --file with the relative path of the file

  7. Save package.json

Validating locally

  1. In a terminal run npm run validate:glassRepairDescriptions

  2. If there are no errors, push the code

Validating in workflow

  1. Go to Action of Import-manger

  2. Find <Environment> - on-demand-import

  3. Select the branch that was created for this import

  4. Enter script name as validate:glassRepairDescriptions

  5. Leave Overrides empty

Importing the file

  1. If the validation has passed

  2. Go to Action of Import-manger

  3. Find <Environment> - on-demand-import

  4. Select the branch that was created for this import

  5. Enter script name as import:glassRepairDescriptions

  6. Enter --persist in Overrides field

Testing

  1. The glass job descriptions will be stored in Firestore, under /config/lookUp/repairDescriptions/.

  2. New documents will be added in Typesense > repairDescriptionsIndex.

  3. The imported glass job descriptions should appear in the search dropdown while adding/ amending a Glass jobline.

Status: Accepted
Category: Protected
Authored By: Sohan on Jul 15, 2024